package cn.dancepeak.mongo.repository;

import cn.dancepeak.mongo.Comment;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository //将当前接口的实例交给Spring管理 - service注入使用 dao层
public interface CommentRepository extends MongoRepository<Comment,String> {
    //findBy 后面加<T>中的属性名
    List<Comment> findByArticleId(Long articleId);

}